package com.ss.android.newmedia.activity;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bytedance.article.common.c.TTUtils;
import com.bytedance.common.utility.Logger;
import com.bytedance.common.utility.collection.WeakHandler;
import com.ss.android.b.AdManager;
import com.ss.android.b.AdManager.b;
import com.ss.android.common.ad.MobAdClickCombiner;
import com.ss.android.common.app.permission.PermissionsManager;
import com.ss.android.common.applog.AppLog;
import com.ss.android.common.lib.MobClickCombiner;
import com.ss.android.common.dialog.AlertDialog;
import com.ss.android.common.util.ToolUtils;
import com.ss.android.newmedia.BaseAppData;
import com.ss.android.newmedia.BaseApplication;
import com.ss.android.newmedia.ConfirmWelcomeType;
import com.ss.android.newmedia.MediaAppData;
import com.ss.android.newmedia.a.DialogListener;
import com.ss.android.newmedia.a.WeakDialogListener;
import com.ss.android.newmedia.activity.browser.BrowserActivity;

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;

import org.json.JSONObject;

import pl.droidsonroids.gif.h;

public abstract class AbsSplashActivity extends BaseActivity implements WeakHandler.Callback {
    public interface a$a {
        void a();
    }

    private boolean A;
    private static ConfirmWelcomeType B = ConfirmWelcomeType.FULL_SCREEN_WELCOME;
    private volatile boolean a;
    private boolean b;
    private boolean c;
    public ImageView d;
    public ImageView e;
    public View f;
    public RelativeLayout g;
    public boolean h;
    public boolean i;
    public boolean j;
    static WeakReference k;
    boolean l;
    public final Handler m = new WeakHandler(((WeakHandler.Callback) this));
    private ImageView n;
    private LinearLayout o;
    private ImageView p;
    private boolean q;
    private boolean r;
    private boolean s;
    private boolean t;
    private boolean u;
    private Dialog v;
    private DialogListener w;
    private DialogListener x;
    private boolean y;
    private boolean z;

    public AbsSplashActivity() {
        this.a = true;
        this.b = true;
        this.c = false;
        this.q = false;
        this.h = true;
        this.i = false;
        this.r = false;
        this.s = false;
        this.t = false;
        this.u = false;
        this.j = false;
        this.l = false;
        this.v = null;
        this.y = false;
        this.z = false;
        this.A = false;
    }

    public static void a(ConfirmWelcomeType arg0) {
        AbsSplashActivity.B = arg0;
    }

    static void a(Activity arg6, List arg7) {
        int v0;
        String v4;
        int v1 = 1;
        Bundle v3 = new Bundle();
        if (arg7.contains("android.permission.WRITE_EXTERNAL_STORAGE")) {
            v4 = "grant_storage";
            v0 = PermissionsManager.getInstance().a(((Context) arg6), "android.permission.WRITE_EXTERNAL_STORAGE") ? 1 : 0;
            v3.putInt(v4, v0);
        }

        if (arg7.contains("android.permission.READ_PHONE_STATE")) {
            v4 = "grant_phone";
            v0 = PermissionsManager.getInstance().a(((Context) arg6), "android.permission.READ_PHONE_STATE") ? 1 : 0;
            v3.putInt(v4, v0);
        }

        if (arg7.contains("android.permission.ACCESS_COARSE_LOCATION")) {
            String v0_1 = "grant_location";
            if (!PermissionsManager.getInstance().a(((Context) arg6), "android.permission.ACCESS_COARSE_LOCATION")) {
                v1 = 0;
            }

            v3.putInt(v0_1, v1);
        }

        if (Logger.debug()) {
            Logger.d("AbsSplashActivity", "request_permission, params: " + v3);
        }

        android.support.design.a.onEvent("request_permission", v3);
    }

    private static void a(String arg7, String[] arg8) {
        Bundle v3 = new Bundle();
        int v4 = arg8.length;
        int v2;
        for (v2 = 0; v2 < v4; ++v2) {
            String v5 = arg8[v2];
            int v0 = -1;
            switch (v5) {
                case "android.permission.ACCESS_COARSE_LOCATION":
                    v0 = 2;
                    break;
                case "android.permission.READ_PHONE_STATE":
                    v0 = 0;
                    break;
                case "android.permission.WRITE_EXTERNAL_STORAGE":
                    v0 = 1;
                    break;
            }

//            label_10:
            switch (v0) {
                case 0: {
                    v3.putString("phone_permission", "phone");
                    break;
                }
                case 1: {
                    v3.putString("storage_permission", "storage");
                    break;
                }
                case 2: {
                    v3.putString("location_permission", "location");
                    break;
                }
            }
        }

        if (Logger.debug()) {
            Logger.d("AbsSplashActivity", arg7 + ", params: " + v3);
        }

        android.support.design.a.onEvent(arg7, v3);
    }

    public void a(DialogInterface arg1, boolean arg2) {
    }

    public boolean a(b arg11) {
        int v8 = 8;
        boolean v7 = false;
        if (arg11 != null) {
            Logger.d("BaseSplashActivity", "show pic splash ad");
            p v5 = new p(this);
            Boolean[] v6 = new Boolean[]{Boolean.valueOf(false)};
            if (AdManager.getInstance(((Context) this)).tryShowImageSplash(this, arg11, this.e, this.d, ((h) v5), v6)) {
                ImageView v1 = this.n;
                int v0 = arg11.m == 2 ? View.VISIBLE : View.GONE;
                v1.setVisibility(v0);
                this.n.setOnClickListener(new q(this, arg11));
                LinearLayout v1_1 = this.o;
                v0 = arg11.m == 1 ? View.VISIBLE : View.GONE;
                v1_1.setVisibility(v0);
                this.o.setOnClickListener(new com.ss.android.newmedia.activity.c(this, arg11));
                View v0_1 = this.f;
                if (arg11.n == 1) {
                    v8 = 0;
                }

                v0_1.setVisibility(v8);
                this.f.setOnClickListener(new com.ss.android.newmedia.activity.d(this, arg11));
                if (this.d != null) {
                    this.g.setBackgroundResource(com.ss.android.article.browser.R.drawable.j0);
                    this.d.setOnClickListener(new e(this, arg11));
                }

                com.bytedance.ttstat.a.a(((Activity) this));
                this.m.sendEmptyMessageDelayed(102, Math.max(arg11.h, arg11.b()));
                this.m.sendMessageDelayed(this.m.obtainMessage(103, v6[0]), Math.min(arg11.h, arg11.b()));
                this.i();
                v7 = true;
            }
        }

        return v7;
    }

    public final boolean a(@NonNull b arg12, JSONObject arg13) {
        Exception v1;
        boolean v0_1;
        boolean v10 = true;
        this.j = true;
        this.m.removeMessages(103);
        this.m.removeMessages(100);
        this.m.removeMessages(102);
        if (!TextUtils.isEmpty(arg12.openUrl)) {
            v0_1 = android.support.design.a.a(this, arg12.openUrl, arg12.logExtra, arg12.id, arg12.p);
        } else {
            v0_1 = false;
        }

        if (!v0_1) {
//            goto label_26;
        } else {
            this.A = true;
            return v0_1;
        }

        try {
//            label_26:
            if (!TextUtils.isEmpty(arg12.webUrl)) {
//                goto label_37;
            } else {
                this.m.sendEmptyMessageDelayed(100, 4000);
                return v0_1;
            }
            int v1_1 = 2;
            if (v1_1 == arg12.adType && (TTUtils.isValidUrl(arg12.webUrl))) {
                Intent v1_2 = new Intent(((Context) this), BrowserActivity.class);
                v1_2.setData(Uri.parse(arg12.webUrl));
                if (!android.support.design.a.isTextEmpty(arg12.webTitle)) {
                    v1_2.putExtra("title", arg12.webTitle);
                }

                v1_2.putExtra("ad_id", arg12.id);
                v1_2.putExtra("bundle_download_app_log_extra", arg12.logExtra);
                v1_2.putExtra("bundle_forbid_jump", arg12.p);
                v1_2.putExtra("orientation", arg12.orientation);
                this.startActivityForResult(v1_2, 101);
                return true;
            }

            if (1 != arg12.adType) {
                label_131:
                this.m.sendEmptyMessage(102);
                return v0_1;
            }

            if (android.support.design.a.isTextEmpty(arg12.pkg)) {
//                goto label_85;
            } else if (!ToolUtils.isAppInstalled(((Context) this), arg12.pkg)) {
//                goto label_85;
            } else {
                try {
                    this.startActivity(ToolUtils.getLaunchIntentForPackage(((Context) this), arg12.pkg));
                    this.finish();
                    return v10;
                } catch (Exception ex) {
                }
            }
            label_85:
            if (android.support.design.a.isTextEmpty(arg12.alertText)) {
                PermissionsManager.getInstance().requestPermission(((Activity) this), new String[]{"android.permission.WRITE_EXTERNAL_STORAGE"}, new f(this, arg12));
                MobAdClickCombiner.onAdEvent(this, "splash_ad", "download_confirm", arg12.id, 0, arg13, 3);
                return v10;
            }

            AlertDialog.Builder v1_3 = com.ss.android.j.b.createDialogBuilder(((Context) this));
            v1_3.setMessage(arg12.alertText);
            v1_3.setCancelable(false);
            v1_3.setPositiveButton(com.ss.android.article.browser.R.string.splash_app_download_confirm, new g(this, arg12, arg13));
            v1_3.setNegativeButton(com.ss.android.article.browser.R.string.splash_app_download_cancel, new i(this, arg12, arg13));
            AlertDialog v1_4 = v1_3.create();
            this.x = new j(this);
            WeakDialogListener v2 = new WeakDialogListener(this.x);
            ((Dialog) v1_4).setOnDismissListener(((DialogInterface.OnDismissListener) v2));
            ((Dialog) v1_4).setOnShowListener(((DialogInterface.OnShowListener) v2));
            ((Dialog) v1_4).show();
            this.v = ((Dialog) v1_4);
            return v0_1;

        } catch (Exception ex) {
            android.support.design.a.a(ex);
            return v0_1;
        }
    }

    public void b() {
        int v0 = 0;
        if (this.h) {
            b v2 = AdManager.getInstance(((Context) this)).c();
            int v2_1 = v2 == null || !this.a(v2) ? 0 : 1;
            if (v2_1 != 0) {
                v0 = 1;
//                goto label_4;
            } else {
                AdManager.getInstance(((Context) this)).a("sdk_splash", "splash");
            }
        }

        label_4:
        if (v0 == 0) {
            this.c();
        }
    }

    public final void b(b arg14) {
        JSONObject v8;
        int v12 = 102;
        float v11 = 0.5f;
        try {
            v8 = new JSONObject();
            if (arg14.q == 0) {
                v8.put("show_time", arg14.b());
            }

            if (android.support.design.a.isTextEmpty(arg14.logExtra)) {
//                goto label_16;
            } else {
                v8.put("log_extra", arg14.logExtra);
            }
        } catch (Exception v0) {
            v8 = null;
        }

        label_16:
        MobAdClickCombiner.onAdEvent(this, "splash_ad", "skip", arg14.id, 0, v8, 3);
        com.bytedance.ttstat.a.b();
        com.bytedance.ttstat.a.c();
        this.j = true;
        this.m.removeMessages(103);
        this.m.removeMessages(v12);
        this.f.findViewById(com.ss.android.article.browser.R.id.skip_real).setVisibility(View.INVISIBLE);
        this.p.setVisibility(View.VISIBLE);
        RotateAnimation v0_1 = new RotateAnimation(0f, 359f, 1, v11, 1, v11);
        v0_1.setDuration(800);
        v0_1.setRepeatCount(-1);
        v0_1.setRepeatMode(1);
        v0_1.setInterpolator(new LinearInterpolator());
        this.p.startAnimation(((Animation) v0_1));
        this.m.obtainMessage(v12).sendToTarget();
    }

    protected final void b(b arg11, boolean arg12) {
        int v0_1;
        String v1;
        JSONObject v8;
        if (!this.j) {
            try {
                v8 = new JSONObject();
                v8.put("show_time", arg11.b());
                v1 = "area";
                if (arg12) {
                    v0_1 = 0;
                } else {
                    v0_1 = 1;
                }

                v8.put(v1, v0_1);
                if (android.support.design.a.isTextEmpty(arg11.logExtra)) {
//                    goto label_18;
                } else {
                    v8.put("log_extra", arg11.logExtra);
                }
            } catch (Exception v0) {
                label_30:
                v8 = null;
            }

            label_18:
            MobAdClickCombiner.onAdEvent(this, "splash_ad", "click", arg11.id, 0, v8, 3);
            this.a(arg11, v8);
        }
    }

    private void c() {
        Logger.d("AbsSplashActivity", "no delay go main");
        com.bytedance.ttstat.a.e();
        this.d();
        this.q = true;
    }

    public void d() {
        com.ss.android.l.c.c();
        this.m.removeMessages(100);
        if (!this.c) {
            this.c = true;
            if (!this.a) {
                com.ss.android.l.c.c();
                return;
            }

            if (this.q) {
                BaseAppData.inst().g(((Context) this));
                this.q = false;
            }

            Intent v0 = this.e();
            try {
                WindowManager.LayoutParams v1_1 = this.getWindow().getAttributes();
                v1_1.flags &= -1025;
                this.getWindow().setAttributes(v1_1);
                this.getWindow().clearFlags(512);
                this.getWindow().setFlags(256, 65536);
                this.startActivity(v0);
            } catch (Throwable v1) {
                try {
                    v0.setFlags(0);
                    this.startActivity(v0);
                } catch (Throwable v0_1) {
                    v0_1.printStackTrace();
                }
            }

            if (this.isFinishing()) {
                com.ss.android.l.c.c();
                return;
            }

            this.finish();
        }

        label_36:
        com.ss.android.l.c.c();
    }

    public abstract Intent e();

    public boolean enableInitHook() {
        return false;
    }

    public boolean enableMobClick() {
        return this.r;
    }

    public boolean f() {
        return false;
    }

    public void g() {
        this.d = (ImageView) this.findViewById(com.ss.android.article.browser.R.id.splash_view);
        this.e = (ImageView) this.findViewById(com.ss.android.article.browser.R.id.banner_view);
        this.n = (ImageView) this.findViewById(com.ss.android.article.browser.R.id.ad_click_small);
        this.o = (LinearLayout) this.findViewById(com.ss.android.article.browser.R.id.ad_click);
        this.f = this.findViewById(com.ss.android.article.browser.R.id.ad_ignore);
        this.p = (ImageView) this.findViewById(com.ss.android.article.browser.R.id.ad_skip_loading);
        this.g = (RelativeLayout) this.findViewById(com.ss.android.article.browser.R.id.root_layout);
    }

    public void h() {
    }

    public void handleMsg(Message message) {
        boolean v0_1;
        int v2 = 102;
        if (!this.a) {
            return;
        }

        switch (message.what) {
            case 100: {
                this.d();
                return;
            }
            case 101: {
                this.b();
                return;
            }
            case 102: {
                this.c();
                return;
            }
            case 103: {
                try {
                    label_13:
                    v0_1 = ((Boolean) message.obj).booleanValue();
                    if (!this.j) {
                        if ((v0_1) && !this.u) {
                            this.t = true;
                            return;
                        }

                        this.m.removeMessages(v2);
                        this.m.obtainMessage(v2).sendToTarget();
                    }
                } catch (Exception v0) {
                    v0_1 = false;
                }
            }
        }

        return;
    }

    public void i() {
    }

    final void k() {
        if (this.b) {
            if ((this.i) || AbsSplashActivity.B == ConfirmWelcomeType.NO_WELCOME) {
                if (AbsSplashActivity.B == ConfirmWelcomeType.NO_WELCOME) {
                    this.m();
                }

                this.r = true;
                if (this.l) {
                    this.n();
//                    goto label_16;
                } else {
                    this.l();
                }
            }

            label_16:
            if (!this.c && (this.i) && (this.l)) {
                this.n();
                if (!this.f()) {
                    this.b();
                }
            }

            if (!this.f()) {
//                goto label_29;
            } else {
                this.d();
            }
        }

        label_29:
        if (!this.z) {
            MediaAppData.provide().onActivityResumed(((Activity) this));
        }

        Intent v0 = this.getIntent();
        if (!this.i) {
            if (v0 != null) {
                Bundle v1 = v0.getExtras();
                if (v1 != null && (v1.getBoolean("from_widget_provider"))) {
                    v0.getStringExtra("action");
                    v0.getExtras();
                    if (this.v != null && (this.v.isShowing())) {
//                        goto label_56;
                    } else {
                        new k(this).a();
                        return;
                    }
                }
            }

            label_56:
            if (this.v != null && (this.v.isShowing())) {
//                goto label_64;
            } else {
                new l(this).a();
//               goto label_64;
            }
        }
        label_64:
        if (!this.b) {
            return;
        }

        if (this.c) {
            return;
        }

        this.b = false;
        if (!this.i) {
            return;
        }

        if (!this.l) {
            return;
        }

        if (v0 != null) {
            Bundle v0_1 = v0.getExtras();
            if (v0_1 != null && (v0_1.getBoolean("from_notification"))) {
                MobClickCombiner.onEvent(((Context) this), "more_tab", "notify_click");
                MobClickCombiner.onEvent(((Context) this), "apn", "recall");
            }
        }

        if (!this.f()) {
            return;
        }

        this.d();
    }

    protected final boolean l() {
        BaseAppData.inst();
        if (this.l) {
            boolean v0 = false;
            return v0;
        }

        try {
            View v2 = LayoutInflater.from(((Context) this)).inflate(com.ss.android.article.browser.R.layout.ai, null);
            ((TextView) v2.findViewById(com.ss.android.article.browser.R.id.content)).setText(com.ss.android.article.browser.R.string.ss_hint_notify_dialog);
            v2.findViewById(com.ss.android.article.browser.R.id.j8).setVisibility(View.GONE);
            AlertDialog.Builder v0_2 = com.ss.android.j.b.createDialogBuilder(((Context) this));
            v0_2.setTitle(com.ss.android.article.browser.R.string.ss_hint);
            v0_2.setCustomTitle(v2);
            v0_2.setPositiveButton(com.ss.android.article.browser.R.string.ss_hint_permission, new m());
            v0_2.setNegativeButton(com.ss.android.article.browser.R.string.ss_hint_deny, new n());
            AlertDialog v0_3 = v0_2.create();
            this.w = new o(this);
            WeakDialogListener v2_1 = new WeakDialogListener(this.w);
            v0_3.setOnDismissListener(((DialogInterface.OnDismissListener) v2_1));
            v0_3.setOnShowListener(((DialogInterface.OnShowListener) v2_1));
            v0_3.show();
            this.v = ((Dialog) v0_3);
        } catch (Exception v0_1) {
            this.l = true;
            BaseAppData.a(this.getApplicationContext(), this.l);
            this.n();
            this.b();
        }

        return true;
    }

    final void m() {
        this.i = true;
        BaseAppData.b(this.getApplicationContext(), this.i);
    }

    protected final void n() {
        if (!this.s) {
            this.h();
            this.s = true;
        }
    }

    final void o() {
        int v1 = 102;
        if (!this.j) {
            if (this.t) {
                this.m.removeMessages(v1);
                this.m.obtainMessage(v1).sendToTarget();
            } else {
                this.u = true;
            }
        }
    }

    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
        Logger.d("AbsSplashActivity", "onActivityResult request Code = " + requestCode);
        if (requestCode == 101) {
            this.m.sendEmptyMessage(102);
        }
    }

    public void onBackPressed() {
    }

    public void onCreate(Bundle savedInstanceState) {
        int v4 = 2097152;
        int v0 = 0;
        com.ss.android.l.c.c();
        this.mActivityAnimType = 1;
        super.onCreate(savedInstanceState);
        Intent v1 = this.getIntent();
        this.i = BaseAppData.o(this.getApplicationContext());
        this.l = BaseAppData.h(this.getApplicationContext());
        BaseAppData.i(this.getApplicationContext());
        this.setContentView(com.ss.android.article.browser.R.layout.splash_activity);
        this.a = true;
        this.b = true;
        this.c = false;
        this.g();
        if (v1 != null) {
            v0 = v1.getFlags();
        }

        v0 &= v4;
        if (v1 == null || v0 != 0) {
            if (savedInstanceState != null) {
                this.A = savedInstanceState.getBoolean("key_pending_go_to_main");
            }

            com.ss.android.l.c.c();
        } else {
            v1.addFlags(v4);
            v1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            v1.setPackage(null);
            AppLog.o = v1.getIntExtra("launch_from", 1);
            this.finish();
            Logger.d("AbsSplashActivity", "Intent does not has FLAG_ACTIVITY_RESET_TASK_IF_NEEDED , restart !");
            this.startActivity(v1);
        }
    }

    public void onDestroy() {
        if (this.v != null) {
            this.v.dismiss();
        }

        this.m.removeMessages(100);
        this.m.removeMessages(101);
        this.m.removeMessages(102);
        this.m.removeMessages(103);
        this.a = false;
        super.onDestroy();
        if (this.p != null) {
            this.p.clearAnimation();
        }
    }

    public void onPause() {
        super.onPause();
        if (this.q) {
            BaseAppData.inst().g(((Context) this));
            this.q = false;
        }
    }

    public void onPostCreate(Bundle arg1) {
        super.onPostCreate(arg1);
    }

    public void onResume() {
        long v10 = 0;
        int v9 = 3;
        int v8 = 2;
        this.z = MediaAppData.provide().cK;
        super.onResume();
        if (!this.isFinishing()) {
            if (Build.VERSION.SDK_INT < 23 || (this.y)) {
                this.k();
            } else {
                this.y = true;
                BaseAppData.inst();
                String[] v3 = new String[v8];
                v3[0] = "android.permission.READ_PHONE_STATE";
                v3[1] = "android.permission.WRITE_EXTERNAL_STORAGE";
                SharedPreferences v4 = this.getSharedPreferences("main_app_settings", 0);
                int v1 = v4.getLong("last_splash_permission_request_time", v10) == v10 ? 1 : 0;
                SharedPreferences.Editor v4_1 = v4.edit();
                v4_1.putLong("last_splash_permission_request_time", System.currentTimeMillis());
                v4_1.apply();
                if (v1 != 0) {
                    String[] v4_2 = new String[v9];
                    v4_2[0] = "android.permission.READ_PHONE_STATE";
                    v4_2[1] = "android.permission.WRITE_EXTERNAL_STORAGE";
                    v4_2[v8] = "android.permission.ACCESS_COARSE_LOCATION";
                    ArrayList v5 = new ArrayList();
                    int v0;
                    for (v0 = 0; v0 < v9; ++v0) {
                        String v6 = v4_2[v0];
                        if (PermissionsManager.getInstance().a(((Context) this), v6)) {
                            ((List) v5).add(v6);
                        }
                    }

                    AbsSplashActivity.a("granted_permissions", (String[]) ((List) v5).toArray(new String[0]));
                }

                if (PermissionsManager.getInstance().a(((Context) this), "android.permission.READ_PHONE_STATE")) {
                    ((BaseApplication) this.getApplication()).initDeviceId();
                }

                if (PermissionsManager.getInstance().a(((Context) this), v3)) {
                    if (v1 != 0) {
                        AbsSplashActivity.a("got_all_permissions_without_requesting", v3);
                    }

                    this.k();
                    return;
                }

                ArrayList v4_3 = new ArrayList();
                for (int v0 = 0; v0 < v8; ++v0) {
                    String v5_1 = v3[v0];
                    if (!PermissionsManager.getInstance().a(((Context) this), v5_1)) {
                        ((List) v4_3).add(v5_1);
                    }
                }

                if (v1 != 0) {
                    AbsSplashActivity.a("show_permission_dialog", (String[]) ((List) v4_3).toArray(new String[0]));
                }

                com.bytedance.ttstat.a.d();
                if (v1 != 0) {
                    PermissionsManager.getInstance().requestPermission(((Activity) this), (String[]) ((List) v4_3).toArray(new String[0]), new com.ss.android.newmedia.activity.b(this, ((List) v4_3), ((Activity) this)));
//                    goto label_98;
                } else {
                    this.k();
                }
            }

            label_98:
            if (!this.A) {
                return;
            }

            this.A = false;
            this.m.sendEmptyMessage(100);
        }
    }

    public void onSaveInstanceState(Bundle arg3) {
        super.onSaveInstanceState(arg3);
        arg3.putBoolean("key_pending_go_to_main", this.A);
    }

    public final void p() {
        this.m.removeMessages(102);
        this.m.obtainMessage(102).sendToTarget();
    }

    public boolean showSelfPermissionDialog() {
        return false;
    }
}

